<?xml version="1.0" encoding="utf-8" ?>
<Recipe xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
Name="ListInstanceImport"
xmlns="http://schemas.microsoft.com/pag/gax-core"
Bound="false">
	<xi:include href="../../../TypeAlias.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
	<Caption>Import List Instance</Caption>
	<Description>Import list instance</Description>
	<HostData Priority="340">
		<Icon File="Help/Icons/icon_Import.ico" />
		<CommandBar Menu="SPSFProjectImport"/>
		<CommandBar Menu="SPSFFolderImport"/>
		<spsf:MetaData
		  Visible="true"
		  BindingType="CustomizationReference"
		  BindingTypeTemplate="CustomizationReferenceTemplate"
		  Enabled="true"
		  ExcludeFromTests="true"
		  CreateVSTemplate="true"
		  FeatureScopes="Web;Site"
		  Category="Import" xmlns:spsf="http://www.spalmblogger.de">
			<spsf:Authors>
				<spsf:Author>Torsten Mandelkow</spsf:Author>
			</spsf:Authors>
			<spsf:VersionHistory>
				<spsf:VersionHistoryEntry>1.0 Initial Recipe</spsf:VersionHistoryEntry>
			</spsf:VersionHistory>
			<spsf:WebPageContent>
				<![CDATA[]]>
			</spsf:WebPageContent>
		</spsf:MetaData>
	</HostData>
	<Arguments>

		<Argument Name="AllowedScopes" Type="System.String">
			<ValueProvider Type="Evaluator" Expression="Site" />
		</Argument>

		<xi:include href="../../BaseArguments.include" parse="xml" xpointer="xmlns(p=http://schemas.microsoft.com/pag/gax-core) xpointer(/p:Arguments/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />

		<xi:include href="../BaseFeatureArguments.include" parse="xml" xpointer="xmlns(p=http://schemas.microsoft.com/pag/gax-core) xpointer(/p:Arguments/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />

		<Argument Name="ElementsCategory">
			<ValueProvider Type="Evaluator" Expression="ListInstances" />
		</Argument>

		<Argument Name="ResourceKeyPrefix" Required="true">
			<!-- provides the unique key with removed special chars -->
			<ValueProvider Stage="OnBeforeActions" RecipeArgument="ListTemplateName" Type="ConvertedStringProvider" />
		</Argument>

		<Argument Name="SiteUrl" Required="true"/>
		<Argument Name="ListId" Type="System.Guid" Required="true"/>

		<Argument Name="ListTemplateName" Required="true">
			<ValueProvider Type="Evaluator" Expression="CustomList" />
		</Argument>
		<Argument Name="ListTemplateFeatureId" Required="false">
			<ValueProvider Type="Evaluator" Expression="" />
		</Argument>

		<Argument Name="ListTemplateDisplayName" Required="true">
			<ValueProvider Type="Evaluator" Expression="Custom List" />
		</Argument>
		<Argument Name="ListTemplateDescription" >
			<ValueProvider Type="Evaluator" Expression="Template to create a custom list" />
		</Argument>

		<Argument Name="ListTemplateType" Type="System.String" Required="true" />

		<Argument Name="ListTemplateBaseType" >
			<ValueProvider Type="Evaluator" Expression="1" />
		</Argument>
		<Argument Name="ListTemplateCategory" >
			<Converter Type="SPALM.SharePointSoftwareFactory.Library.Converters.ListTemplateCategoryConverter, SPALM.SharePointSoftwareFactory.Library" />
			<ValueProvider Type="Evaluator" Expression="Custom Lists" />
		</Argument>
		<Argument Name="ListTemplateOnQuickLaunch" Type="System.Boolean">
			<ValueProvider Type="Evaluator" Expression="false" />
		</Argument>
		<Argument Name="ListTemplateDisableAttachments" Type="System.Boolean">
			<ValueProvider Type="Evaluator" Expression="false" />
		</Argument>
		<Argument Name="ListTemplateDisallowContentTypes" Type="System.Boolean">
			<ValueProvider Type="Evaluator" Expression="false" />
		</Argument>
		<Argument Name="ListTemplateVersioningEnabled" Type="System.Boolean">
			<ValueProvider Type="Evaluator" Expression="false" />
		</Argument>
		<Argument Name="ListTemplateFolderCreation" Type="System.Boolean">
			<ValueProvider Type="Evaluator" Expression="false" />
		</Argument>
		<Argument Name="ListTemplateEnableModeration" Type="System.Boolean">
			<ValueProvider Type="Evaluator" Expression="false" />
		</Argument>
		<Argument Name="ListTemplateSecurityBitsRead" >
			<Converter Type="SPALM.SharePointSoftwareFactory.Library.Converters.ListTemplateSecurityBitsConverterRead, SPALM.SharePointSoftwareFactory.Library" />
		</Argument>
		<Argument Name="ListTemplateSecurityBitsEdit" >
			<Converter Type="SPALM.SharePointSoftwareFactory.Library.Converters.ListTemplateSecurityBitsConverterEdit, SPALM.SharePointSoftwareFactory.Library" />
		</Argument>
		<Argument Name="ListTemplateSequence" Type="System.Int32">
			<ValueProvider Type="Evaluator" Expression="1000" />
		</Argument>
		<Argument Name="ListTemplateImage" >
			<ValueProvider Type="Evaluator" Expression="/_layouts/images/$(LayoutsFolder)/$(ListTemplateName).gif" />
		</Argument>
		<Argument Name="ListTemplateHidden" Type="System.Boolean" >
			<ValueProvider Type="Evaluator" Expression="false" />
		</Argument>
		<Argument Name="ListTemplateHiddenList" Type="System.Boolean" >
			<ValueProvider Type="Evaluator" Expression="false" />
		</Argument>

		<Argument Name="ListInstanceId" Required="true">
			<ValueProvider Type="GuidValueProvider" />
		</Argument>
		<Argument Name="ListInstanceUrl" Required="true">
			<ValueProvider Type="Evaluator" Expression="List/$(ListTemplateName)" >
				<MonitorArgument Name="ListTemplateName"/>
			</ValueProvider>
		</Argument>
		<Argument Name="ListInstanceOnQuickLaunch" Type="System.Boolean" Required="true">
			<ValueProvider Type="Evaluator" Expression="true" />
		</Argument>
		<Argument Name="ListInstanceQuickLaunchUrl" Required="false">
			<ValueProvider Type="Evaluator" Expression="List/$(ListTemplateName)/AllItems.aspx" >
				<MonitorArgument Name="ListTemplateName"/>
			</ValueProvider>
		</Argument>
		<Argument Name="ListInstanceRootWebOnly" Type="System.Boolean" Required="true">
			<ValueProvider Type="Evaluator" Expression="false" />
		</Argument>

		<Argument Name="ListInstanceTitle" Required="true">
			<ValueProvider Stage="OnBeforeActions" Type="Evaluator" Expression="$(ListTemplateDisplayName)" />
		</Argument>
		<Argument Name="ListInstanceDescription" Required="true">
			<ValueProvider Stage="OnBeforeActions" Type="Evaluator" Expression="$(ListTemplateDescription)" />
		</Argument>
		<Argument Name="ListInstanceFeatureId" Required="true">
			<ValueProvider Stage="OnBeforeActions" Type="Evaluator" Expression="$(ListTemplateFeatureId)" />
		</Argument>
		<Argument Name="ListInstanceTemplateType" Required="true">
			<ValueProvider Stage="OnBeforeActions" Type="Evaluator" Expression="$(ListTemplateType)" />
		</Argument>

		<Argument Name="ListInstanceName" Required="true">
			<!-- provides the unique key with removed special chars -->
			<ValueProvider Stage="OnBeforeActions" Type="ConvertedStringProvider" RecipeArgument="ListTemplateDisplayName" />
		</Argument>

		
	</Arguments>
	<GatheringServiceData>
		<Wizard xmlns="http://schemas.microsoft.com/pag/gax-wizards" SchemaVersion="1.0">
			<Pages>
				<Page Type="SPALM.SharePointSoftwareFactory.Library.CustomWizardPages.FeatureSelectionPage, SPALM.SharePointSoftwareFactory.Library" />
				<Page Height="350" Type="SPALM.SharePointSoftwareFactory.Library.CustomWizardPages.ListTemplateImportPage, SPALM.SharePointSoftwareFactory.Library" />
				<Page Height="350">
					<Title>List Instance Settings</Title>
					<Fields>
						<Field ValueName="ListTemplateDisplayName" Label="Title">
							<Help>Required Text. Title of the list in the schema.</Help>
						</Field>
						<Field ValueName="ListTemplateDescription" Label="Description">
							<Help>Optional Text. Contains a description of the list.</Help>
						</Field>
						<Field ValueName="ListInstanceUrl" Label="Url">
							<Help>Required Text. Returns the site-relative URL at which to place the list.</Help>
						</Field>
					</Fields>
				</Page>
				<Page Height="350">
					<Title>Options</Title>
					<Fields>
						<Field ValueName="ListInstanceRootWebOnly" Label="RootWebOnly">
							<Help>Optional Boolean. TRUE to specify that the list created from the definition exists only in the root Web site of a site collection.</Help>
						</Field>
						<Field ValueName="ListTemplateOnQuickLaunch" Label="OnQuickLaunch">
							<Help>Optional Boolean. TRUE to display lists created from the list definition on the Quick Launch bar.</Help>
						</Field>
						<Field ValueName="ListInstanceQuickLaunchUrl" Label="QuickLaunchUrl">
							<Help>Optional Text. Specifies the URL of the view page to open for the list through Quick Launch navigation.</Help>
						</Field>
						<Field ValueName="ListInstanceId" Label="Id">
							<Help>Required Text. Specifies a unique identifier for the list instance. The integer must be unique across the Feature definition.</Help>
						</Field>
					</Fields>
				</Page>
			</Pages>
		</Wizard>
	</GatheringServiceData>
	<Actions CoordinatorServiceType="ConditionalCoordinator" >

		<xi:include href="../../BaseStartingActions.include" parse="xml" xpointer="xmlns(p=http://schemas.microsoft.com/pag/gax-core) xpointer(/p:Actions/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />

		<xi:include href="../BaseFeatureActions.include" parse="xml" xpointer="xmlns(p=http://schemas.microsoft.com/pag/gax-core) xpointer(/p:Actions/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />

		<!-- elements.xml-->
		<Action
		  Name="CreateElementsXml"
		  Type="AddElementsDefinitionAction"
		  ParentFeatureName="$(ParentFeatureName)"
		  ElementsName="$(ListInstanceName)"
		  ElementsCategory="$(ElementsCategory)"
		  TemplateFileName="Text\ListInstance\elements.xml.t4"
		  SPDataTemplate="Text\ListInstance\SharePointProjectItem.spdata.t4"
		  Open="true">
			<Output Name="CreatedElementFolder" />
			<Output Name="CreatedElementFile" />
		</Action>

		<!-- Resources -->
		<Action
		  Condition="$(AutoCreateResxFiles)"
		  Name="AddResources"
		  Type="AddTemlateToResourcesFileAction"
		  TemplateFileName="Text\ListInstance\Resources.resx.t4"
      FeatureResources="True">
		</Action>

		<xi:include href="../../BaseFinalActions.include" parse="xml" xpointer="xmlns(p=http://schemas.microsoft.com/pag/gax-core) xpointer(/p:Actions/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />

	</Actions>
</Recipe>